package services.facades.resources;

import DA.HUtil;
import com.sun.jersey.api.core.PackagesResourceConfig;

@javax.ws.rs.ApplicationPath("app")
public class ApplicationConfig extends PackagesResourceConfig {

   public ApplicationConfig() {
       super ("services.facades");
       
       procesosIniciales();
    
   }
  
   private void procesosIniciales (){
        TPersistance initHibernate = new TPersistance();
        initHibernate.start();
   }
   
   class TPersistance extends Thread{
       @Override
       public void run(){
            HUtil.getSessionFactory().openSession();
            
       }
   
   }
  
   
}
